1. Field of the Invention
The present invention relates to data storage systems and data storage methods, and in particular, relates to power-off recovery of dynamic information of a memory.
2. Description of the Related Art
Conventional data storage devices include hard discs and optical discs. Today, new data storage techniques have been developed. For example, solid state discs (SSD), a substitute for hard discs, use NAND flashes for data storage. The NAND flash is a non-volatile memory, widely used in portable electronic devices. For example, in an mp3 audio player, the NAND flash is used as a popular storage medium.
FIG. 1 shows a block diagram depicting a data storage system, in which a NAND flash 102 is used as a storage medium. As shown, the NAND flash 102 has a plurality of blocks (numbered block0, block1 . . . blockn) and each block can be divided into a plurality of pages. For example, the block block0 includes a plurality of pages page(0, 0), page(0, 1) . . . , the block block1 includes a plurality of pages page(1, 0), page(1, 1) . . . , and the blockn includes a plurality of pages page(n, 0), page(n, 1) . . . . To write or read the NAND flash 102, a “Logical Address”, used in the host (not shown), has to be mapped to a “Physical Address” representing the physical space of the NAND flash 102. Thus, a logical-to-physical address mapping table is required. The physical space may be divided into blocks, pages or even smaller storage spaces. Because the physical space of the NAND flash 102 is dynamically allocated to the logical addresses, the logical-to-physical address mapping table is constantly changing. The random access memory (RAM) 104 is designed to store the logical-to-physical address mapping table. In addition to controlling the operations of the NAND flash 102, the memory control unit 106 manages the logical-to-physical address mapping table stored in the RAM 104.
Because the RAM 104 is a volatile memory, it requires power to maintain the stored logical-to-physical address mapping table. It is an important issue to recover the stored logical-to-physical address mapping table when the RAM 104 recovers from an unexpected power-off.